package novel.front.novellist.task;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import novel.common.utils.HttpClientUtil;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class KuaixunTaxk {

    public static void main(String[] args) {

    }

    public void getAndSave(String url){
        String jsonStr = HttpClientUtil.doGet(url);
        JSONObject jsonObject = (JSONObject) JSONObject.parse(jsonStr);
        String limit = ((JSONObject) JSONObject.parse(jsonObject.getString("meta"))).getString("limit");
        JSONArray jsonArray = JSONArray.parseArray(jsonObject.getString("objects"));
    }
}
